<%@page import="news.biz.UserBiz"%>
<%@ page language="java" import="java.util.*,news.entity.*" pageEncoding="UTF-8"%>


<%
	request.setCharacterEncoding("UTF-8");
	response.setCharacterEncoding("UTF-8");
	
	String name=request.getParameter("username");
	String pwd=request.getParameter("userpwd");
	
	User user=new User(name,pwd);
	UserBiz userBiz=new UserBiz();
	boolean flag=userBiz.userRegister(user);
	if(flag){
		out.print("<script>alert('注册成功');location.href='index.jsp'</script>");
	}else{
		out.print("<script>alert('注册失败');location.href='index.jsp'</script>");
	}
%>
